package cn.hanna.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author smileha
 * @create 2021-10-17 11:57
 * @description
 */
@Configuration
public class MySelfRule {

    // 负载均衡规则：随机访问
    @Bean
    public IRule randomRule(){
        return new RandomRule();
    }
}
